.class Lorg/zeam/ApplicationItemInfo;
.super Lorg/zeam/ItemInfo;
.source "ApplicationItemInfo.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lorg/zeam/ApplicationItemInfo$TitleComparator;
    }
.end annotation


# static fields
.field private static final sCollator:Ljava/text/Collator;


# instance fields
.field customIcon:Z

.field filtered:Z

.field icon:Landroid/graphics/drawable/Drawable;

.field iconBitmap:Landroid/graphics/Bitmap;

.field iconResource:Landroid/content/Intent$ShortcutIconResource;

.field intent:Landroid/content/Intent;

.field title:Ljava/lang/CharSequence;

.field titleBitmap:Landroid/graphics/Bitmap;


# direct methods
.method static constructor <clinit>()V
    .locals 1

    .prologue
    .line 117
    invoke-static {}, Ljava/text/Collator;->getInstance()Ljava/text/Collator;

    move-result-object v0

    sput-object v0, Lorg/zeam/ApplicationItemInfo;->sCollator:Ljava/text/Collator;

    .line 31
    return-void
.end method

.method constructor <init>()V
    .locals 1

    .prologue
    .line 44
    invoke-direct {p0}, Lorg/zeam/ItemInfo;-><init>()V

    .line 45
    const/4 v0, 0x1

    iput v0, p0, Lorg/zeam/ApplicationItemInfo;->itemType:I

    .line 46
    return-void
.end method

.method public constructor <init>(Lorg/zeam/ApplicationItemInfo;)V
    .locals 2
    .parameter "info"

    .prologue
    .line 50
    invoke-direct {p0, p1}, Lorg/zeam/ItemInfo;-><init>(Lorg/zeam/ItemInfo;)V

    .line 51
    iget-object v0, p1, Lorg/zeam/ApplicationItemInfo;->title:Ljava/lang/CharSequence;

    invoke-interface {v0}, Ljava/lang/CharSequence;->toString()Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lorg/zeam/ApplicationItemInfo;->title:Ljava/lang/CharSequence;

    .line 52
    new-instance v0, Landroid/content/Intent;

    iget-object v1, p1, Lorg/zeam/ApplicationItemInfo;->intent:Landroid/content/Intent;

    invoke-direct {v0, v1}, Landroid/content/Intent;-><init>(Landroid/content/Intent;)V

    iput-object v0, p0, Lorg/zeam/ApplicationItemInfo;->intent:Landroid/content/Intent;

    .line 53
    iget-object v0, p1, Lorg/zeam/ApplicationItemInfo;->iconResource:Landroid/content/Intent$ShortcutIconResource;

    if-eqz v0, :cond_0

    .line 54
    new-instance v0, Landroid/content/Intent$ShortcutIconResource;

    invoke-direct {v0}, Landroid/content/Intent$ShortcutIconResource;-><init>()V

    iput-object v0, p0, Lorg/zeam/ApplicationItemInfo;->iconResource:Landroid/content/Intent$ShortcutIconResource;

    .line 55
    iget-object v0, p0, Lorg/zeam/ApplicationItemInfo;->iconResource:Landroid/content/Intent$ShortcutIconResource;

    iget-object v1, p1, Lorg/zeam/ApplicationItemInfo;->iconResource:Landroid/content/Intent$ShortcutIconResource;

    iget-object v1, v1, Landroid/content/Intent$ShortcutIconResource;->packageName:Ljava/lang/String;

    iput-object v1, v0, Landroid/content/Intent$ShortcutIconResource;->packageName:Ljava/lang/String;

    .line 56
    iget-object v0, p0, Lorg/zeam/ApplicationItemInfo;->iconResource:Landroid/content/Intent$ShortcutIconResource;

    iget-object v1, p1, Lorg/zeam/ApplicationItemInfo;->iconResource:Landroid/content/Intent$ShortcutIconResource;

    iget-object v1, v1, Landroid/content/Intent$ShortcutIconResource;->resourceName:Ljava/lang/String;

    iput-object v1, v0, Landroid/content/Intent$ShortcutIconResource;->resourceName:Ljava/lang/String;

    .line 58
    :cond_0
    iget-object v0, p1, Lorg/zeam/ApplicationItemInfo;->icon:Landroid/graphics/drawable/Drawable;

    iput-object v0, p0, Lorg/zeam/ApplicationItemInfo;->icon:Landroid/graphics/drawable/Drawable;

    .line 59
    iget-boolean v0, p1, Lorg/zeam/ApplicationItemInfo;->filtered:Z

    iput-boolean v0, p0, Lorg/zeam/ApplicationItemInfo;->filtered:Z

    .line 60
    iget-boolean v0, p1, Lorg/zeam/ApplicationItemInfo;->customIcon:Z

    iput-boolean v0, p0, Lorg/zeam/ApplicationItemInfo;->customIcon:Z

    .line 61
    return-void
.end method

.method static synthetic access$0()Ljava/text/Collator;
    .locals 1

    .prologue
    .line 117
    sget-object v0, Lorg/zeam/ApplicationItemInfo;->sCollator:Ljava/text/Collator;

    return-object v0
.end method

.method public static dumpApplicationInfoList(Ljava/lang/String;Ljava/lang/String;Ljava/util/ArrayList;)V
    .locals 4
    .parameter "tag"
    .parameter "label"
    .parameter
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/lang/String;",
            "Ljava/lang/String;",
            "Ljava/util/ArrayList",
            "<",
            "Lorg/zeam/ApplicationItemInfo;",
            ">;)V"
        }
    .end annotation

    .prologue
    .line 105
    .local p2, list:Ljava/util/ArrayList;,"Ljava/util/ArrayList<Lorg/zeam/ApplicationItemInfo;>;"
    new-instance v1, Ljava/lang/StringBuilder;

    invoke-static {p1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v2

    invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v2, " size="

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {p2}, Ljava/util/ArrayList;->size()I

    move-result v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {p0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 106
    invoke-virtual {p2}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;

    move-result-object v1

    :goto_0
    invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z

    move-result v2

    if-nez v2, :cond_0

    .line 110
    return-void

    .line 106
    :cond_0
    invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lorg/zeam/ApplicationItemInfo;

    .line 107
    .local v0, info:Lorg/zeam/ApplicationItemInfo;
    new-instance v2, Ljava/lang/StringBuilder;

    const-string v3, "   title=\""

    invoke-direct {v2, v3}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    iget-object v3, v0, Lorg/zeam/ApplicationItemInfo;->title:Ljava/lang/CharSequence;

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v2

    const-string v3, "\" titleBitmap="

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    .line 108
    iget-object v3, v0, Lorg/zeam/ApplicationItemInfo;->titleBitmap:Landroid/graphics/Bitmap;

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v2

    const-string v3, " iconBitmap="

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    iget-object v3, v0, Lorg/zeam/ApplicationItemInfo;->iconBitmap:Landroid/graphics/Bitmap;

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    .line 107
    invoke-static {p0, v2}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    goto :goto_0
.end method


# virtual methods
.method onAddToDatabase(Landroid/content/ContentValues;)V
    .locals 6
    .parameter "values"

    .prologue
    const/4 v5, 0x0

    const/4 v4, 0x0

    .line 75
    invoke-super {p0, p1}, Lorg/zeam/ItemInfo;->onAddToDatabase(Landroid/content/ContentValues;)V

    .line 76
    iget-object v3, p0, Lorg/zeam/ApplicationItemInfo;->title:Ljava/lang/CharSequence;

    if-eqz v3, :cond_1

    iget-object v3, p0, Lorg/zeam/ApplicationItemInfo;->title:Ljava/lang/CharSequence;

    invoke-interface {v3}, Ljava/lang/CharSequence;->toString()Ljava/lang/String;

    move-result-object v3

    move-object v1, v3

    .line 77
    .local v1, titleStr:Ljava/lang/String;
    :goto_0
    const-string v3, "title"

    invoke-virtual {p1, v3, v1}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/String;)V

    .line 78
    iget-object v3, p0, Lorg/zeam/ApplicationItemInfo;->intent:Landroid/content/Intent;

    if-eqz v3, :cond_2

    iget-object v3, p0, Lorg/zeam/ApplicationItemInfo;->intent:Landroid/content/Intent;

    invoke-virtual {v3, v4}, Landroid/content/Intent;->toUri(I)Ljava/lang/String;

    move-result-object v3

    move-object v2, v3

    .line 79
    .local v2, uri:Ljava/lang/String;
    :goto_1
    const-string v3, "intent"

    invoke-virtual {p1, v3, v2}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/String;)V

    .line 81
    iget-boolean v3, p0, Lorg/zeam/ApplicationItemInfo;->customIcon:Z

    if-eqz v3, :cond_4

    .line 82
    const-string v3, "iconType"

    .line 83
    const/4 v4, 0x1

    invoke-static {v4}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v4

    .line 82
    invoke-virtual {p1, v3, v4}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/Integer;)V

    .line 86
    iget-object v3, p0, Lorg/zeam/ApplicationItemInfo;->icon:Landroid/graphics/drawable/Drawable;

    instance-of v3, v3, Landroid/graphics/drawable/BitmapDrawable;

    if-eqz v3, :cond_3

    .line 87
    iget-object p0, p0, Lorg/zeam/ApplicationItemInfo;->icon:Landroid/graphics/drawable/Drawable;

    .end local p0
    check-cast p0, Landroid/graphics/drawable/BitmapDrawable;

    invoke-virtual {p0}, Landroid/graphics/drawable/BitmapDrawable;->getBitmap()Landroid/graphics/Bitmap;

    move-result-object v0

    .line 91
    .local v0, bitmap:Landroid/graphics/Bitmap;
    :goto_2
    invoke-static {p1, v0}, Lorg/zeam/ApplicationItemInfo;->writeBitmap(Landroid/content/ContentValues;Landroid/graphics/Bitmap;)V

    .line 101
    .end local v0           #bitmap:Landroid/graphics/Bitmap;
    :cond_0
    :goto_3
    return-void

    .end local v1           #titleStr:Ljava/lang/String;
    .end local v2           #uri:Ljava/lang/String;
    .restart local p0
    :cond_1
    move-object v1, v5

    .line 76
    goto :goto_0

    .restart local v1       #titleStr:Ljava/lang/String;
    :cond_2
    move-object v2, v5

    .line 78
    goto :goto_1

    .line 89
    .restart local v2       #uri:Ljava/lang/String;
    :cond_3
    iget-object p0, p0, Lorg/zeam/ApplicationItemInfo;->icon:Landroid/graphics/drawable/Drawable;

    .end local p0
    check-cast p0, Lorg/zeam/FastBitmapDrawable;

    invoke-virtual {p0}, Lorg/zeam/FastBitmapDrawable;->getBitmap()Landroid/graphics/Bitmap;

    move-result-object v0

    .restart local v0       #bitmap:Landroid/graphics/Bitmap;
    goto :goto_2

    .line 93
    .end local v0           #bitmap:Landroid/graphics/Bitmap;
    .restart local p0
    :cond_4
    const-string v3, "iconType"

    .line 94
    invoke-static {v4}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v4

    .line 93
    invoke-virtual {p1, v3, v4}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/Integer;)V

    .line 96
    iget-object v3, p0, Lorg/zeam/ApplicationItemInfo;->iconResource:Landroid/content/Intent$ShortcutIconResource;

    if-eqz v3, :cond_0

    .line 97
    const-string v3, "iconPackage"

    iget-object v4, p0, Lorg/zeam/ApplicationItemInfo;->iconResource:Landroid/content/Intent$ShortcutIconResource;

    iget-object v4, v4, Landroid/content/Intent$ShortcutIconResource;->packageName:Ljava/lang/String;

    invoke-virtual {p1, v3, v4}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/String;)V

    .line 98
    const-string v3, "iconResource"

    iget-object v4, p0, Lorg/zeam/ApplicationItemInfo;->iconResource:Landroid/content/Intent$ShortcutIconResource;

    iget-object v4, v4, Landroid/content/Intent$ShortcutIconResource;->resourceName:Ljava/lang/String;

    invoke-virtual {p1, v3, v4}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/String;)V

    goto :goto_3
.end method

.method final setActivity(Landroid/content/ComponentName;I)V
    .locals 2
    .parameter "className"
    .parameter "launchFlags"

    .prologue
    .line 65
    new-instance v0, Landroid/content/Intent;

    const-string v1, "android.intent.action.MAIN"

    invoke-direct {v0, v1}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

    iput-object v0, p0, Lorg/zeam/ApplicationItemInfo;->intent:Landroid/content/Intent;

    .line 66
    iget-object v0, p0, Lorg/zeam/ApplicationItemInfo;->intent:Landroid/content/Intent;

    const-string v1, "android.intent.category.LAUNCHER"

    invoke-virtual {v0, v1}, Landroid/content/Intent;->addCategory(Ljava/lang/String;)Landroid/content/Intent;

    .line 67
    iget-object v0, p0, Lorg/zeam/ApplicationItemInfo;->intent:Landroid/content/Intent;

    invoke-virtual {v0, p1}, Landroid/content/Intent;->setComponent(Landroid/content/ComponentName;)Landroid/content/Intent;

    .line 68
    iget-object v0, p0, Lorg/zeam/ApplicationItemInfo;->intent:Landroid/content/Intent;

    invoke-virtual {v0, p2}, Landroid/content/Intent;->setFlags(I)Landroid/content/Intent;

    .line 69
    const/4 v0, 0x0

    iput v0, p0, Lorg/zeam/ApplicationItemInfo;->itemType:I

    .line 70
    return-void
.end method

.method public toString()Ljava/lang/String;
    .locals 1

    .prologue
    .line 114
    iget-object v0, p0, Lorg/zeam/ApplicationItemInfo;->title:Ljava/lang/CharSequence;

    invoke-interface {v0}, Ljava/lang/CharSequence;->toString()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method
